<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>常用指令</title>
</head>
<body>
    <div id="app">
        <p>{{num1+num2}}</p>
        
        <button :title='title'>绑定属性按钮</button>
        <br>
        <button v-on:click='btnClickHandle($event)'>绑定事件按钮</button>
        <br>
        <button @click='num1++'>绑定一段代码</button>
    </div>
    <script src="../vue.js"></script>
    <script>
        new Vue({
            el:'#app',
            data:{
                num1:5,
                num2:3,
                str:'sss',
                flag:true,
                color:'red',
                title:'我是按钮'
            },
            methods:{
                btnClickHandle(e){
                    this.num1++
                }
            }
        })
        
    </script>
</body>
</html>